<template>
    <div>
        <button @click="handleClick()">父组件</button>
        <bbb ref="myaaa"></bbb>
    </div>
</template>

<script>
import bbb from './components/bbb.vue'
export default {
    components:{
        bbb
    },
    methods:{
        handleClick(){
            // this.$refs.ref值.子组件状态名  可以直接拿到子组件中data()中的状态
            this.$refs.myaaa.msg = 'lisi';
            console.log(this.$refs.myaaa.handleClick());
        }
    }
}
</script>